package com.yexiao.cofe.business.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 模板参数关联模型
 * 将模板和参数值相关联
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("template_param")
public class TemplateParam {

    /**
     * 关联ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 模板ID
     */
    @TableField("template_id")
    private int templateId;

    /**
     * 参数项ID
     */
    @TableField("param_item_id")
    private int paramItemId;

    /**
     * 参数值id
     */
    @TableField("param_value_id")
    private int paramValueId;

    /**
     * 参数值
     */
    @TableField("param_value_name")
    private String paramValueName;

    public static final String ID = "id";
    public static final String TEMPLATE_ID = "template_id";
    public static final String PARAM_ITEM_ID = "param_item_id";
    public static final String PARAM_VALUE_ID = "param_value_id";
    public static final String PARAM_VALUE_NAME = "param_value_name";

    public TemplateParam(int templateId, int paramItemId, int paramValueId, String paramValueName) {
        this.templateId = templateId;
        this.paramItemId = paramItemId;
        this.paramValueId = paramValueId;
        this.paramValueName = paramValueName;
    }
}
